<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Affiliatewithdraw extends AdminController{
	public $_validation = null;
	function __construct(){
		parent::__construct();
		$this->load->model('MAffiliateWithdraw');
		$this->_validation = Array();
	}

	/**
     *  返利红利统计信息
	 */
	function index(){
		$this->output->enable_profiler(TRUE);
		$this->load->library('FormFilter');
		$this->load->helper('formfilter');
		
		if($begintime = filterValue('withdraw_create_time_begin')){
		    $this->formfilter->addFilter('affiliatewithdraw_create_time_begin', 'where',array('affiliate_withdraw.create_time >= ',strtotime($begintime.' 00:00:00')));
		}
		if($endtime = filterValue('affiliatewithdraw_create_time_end')){
		    $this->formfilter->addFilter('affiliatewithdraw_create_time_end', 'where',array('affiliate_withdraw.create_time <= ',strtotime($endtime.' 23:59:59')));
		}
		
		$list = $this->MAffiliateWithdraw->getAffiliateWithdrawChart();
		
		$this->assign('list', $list);
		$this->layout();
	}

}